//
// Created by zhulingfeng on 2020/2/6.
//

#ifndef BINARY_TREE__CREATE_BINARY_TREE_HPP_
#define BINARY_TREE__CREATE_BINARY_TREE_HPP_

#include <string>
#include <vector>
#include "binary_tree_node.hpp"

BinaryTreeNode *CreateBTFromLevelOrder(const std::string &s);
BinaryTreeNode *CreateBTFromPreOrder(const std::string &s);
BinaryTreeNode *CreateBTFromPostOrder(const std::string &s);
BinaryTreeNode *CreateBTFromPreAndInOrder(const std::vector<int> &pre,
                                          const std::vector<int> &post);

void GetPostFromPreAndInOrder(const std::vector<int> &pre,
                              const std::vector<int> &in,
                              std::vector<int> &post);
std::vector<int> GetPostFromPreAndInOrder(const std::vector<int> &pre,
                                          const std::vector<int> &in);

#endif  // BINARY_TREE__CREATE_BINARY_TREE_HPP_
